# -*- coding:utf-8 -*-
# @Time: 2020/8/27 17:30
# @Author: liupengfei
# @File: filters.py

import django_filters

from .models import Worker


class WorkerFilter(django_filters.FilterSet):
    name = django_filters.CharFilter(field_name='name', lookup_expr='icontains')
    mobile = django_filters.CharFilter(field_name='mobile', lookup_expr='icontains')

    class Meta:
        model = Worker
        fields = ['name', 'mobile']
